import Vue from "vue";
export const auth = {
  login: params => {
    return Vue.prototype.$post("auth/login", params);
  },
  logout: () => {
    return Vue.prototype.$get("auth/logout");
  },
  getCaptcha: () => {
    return Vue.prototype.$get("auth/captcha");
  },
  getQr: params => {
    return Vue.prototype.$get("common/wechat/loginQrcode", params);
  },
  loginCheck: params => {
    return Vue.prototype.$post("common/wechat/loginCheck", params);
  },
  getSms: params => {
    return Vue.prototype.$post("common/sendSms", params);
  },
  commonLogin: params => {
    return Vue.prototype.$post("common/login", params);
  },
  commonGetUser: params => {
    return Vue.prototype.$get(`common/userInfo/${params}`);
  }
};
